<?php
if (!defined('IN_IA')) {
	die('Access Denied');
}
global $_W, $_GPC;
$operation = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
$openid = m('user')->getOpenid();
if($operation == 'display'){
	$id=$_GPC['id'];
	$goods=pdo_fetch('select * from '.tablename('tg_goods').' where id=:id',array(':id'=>96));
	$goods['gimg']=desc_substr($goods['gimg'],'/');
	$goods['gimg_two']=desc_substr($goods['gimg_two'],'/');
	$goods['gdetaile']='';
	echo json_encode($goods);
}
/**
 * 分割字符串后取出最后一个数组成员
 * @param string $str [传入的字符串]
 * @param string $flag [分割的字符串]
 * @return string
 */
function desc_substr($str,$flag){
	$result=explode('/',$str);
	$result=array_pop($result);
	return $result;
}	